package file_io;

import java.io.*;

public class InputFile {
    public static void main(String[] args) throws IOException {
//       InputStream inputStream = new FileInputStream("src/test.txt");
//
//        /*System.out.println((char)inputStream.read());
//        System.out.println((char)inputStream.read());
//        System.out.println((char)inputStream.read());*/
//      /*  int c;
//        while ((c=inputStream.read())!=-1){
//            System.out.print((char)c);
//        }*/
//        byte []buffer=new byte[3];
//        int length;
//       /*  length= inputStream.read(buffer);
//        System.out.println(new String(buffer,0,length));
//
//        length= inputStream.read(buffer);
//        System.out.println(new String(buffer,0,length));
//
//        length= inputStream.read(buffer);
//        System.out.println(new String(buffer,0,length));
//
//        length= inputStream.read(buffer);
//        System.out.println(new String(buffer));*/
//       /* while ((length=inputStream.read(buffer))!=-1){
//            System.out.println(new String(buffer,0,length));
//        }*/
//       /* File file = new File("src/test.txt");
//        byte []allFile=new byte[(int)file.length()];
//        int read = inputStream.read(allFile);
//        System.out.println("文件大小："+file.length());
//        System.out.println("文件大小："+read);
//        System.out.println(new String(allFile));*/
//        byte[] bytes = inputStream.readAllBytes();
//        System.out.println(new String(bytes));
    }
}
